﻿using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.AI
{
    //这个是为了代替TCCABody用的
    public class CarBodyPhysic : MonoBehaviour
    {
        public Rigidbody carBody;
        public BoxCollider boxCollider;
        public float getForwardVelocity()
        {
            return Vector3.Dot(carBody.velocity, transform.forward);
        }
        public Rigidbody getRigidbody()
        {
            if (carBody == null) carBody = GetComponentInChildren<Rigidbody>();
            return carBody;
        }
    }
}